<?php
/*订单状态为3的单，管理员接单/拒单*/
include_once("../config.php");
//$id=$_GET['id'];
$uid=$_GET['uid'];
$yj=$_GET['yj'];
//$zt=$_GET['zt'];
$uid = str_ireplace($search, '', $uid);
$yj = str_ireplace($search, '', $yj);

$id=intval($_GET['id']);
$zt=intval($_GET['zt']);


$sql = "select status from wenti where id=$id";
$requ=mysqli_query($con,$sql);
$rs=mysqli_fetch_array($requ);
if($rs['status']!=3){
	die('{"status":"-1","msg":"此单已被处理"}');
}else{
	$t=time();
	$sql = "update wenti set status=$zt,clyj='$yj',clsj=$t where id=$id and wxz='$uid'";
	mysqli_query($con,$sql);
	if(mysqli_affected_rows($con)){
		$result='{"status":"1","msg":"ok"}';
	}else{
		$result='{"status":"0","msg":"操作失败，请重试"}';
	}
	echo $result;
}	










